<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>POS收单运营管理平台</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<link href="<s:url value="/css/a.css"/>" type="text/css"
	rel="stylesheet" />
<link href="<s:url value="/css/index.css"/>" type="text/css"

	rel="stylesheet" />
	
<script type="text/javascript"
	src="<c:url value="/js/jquery-1.3.2.js" />"></script>
<script type="text/javascript" src="<c:url value="/js/common.js" />"></script>
<script language="javascript" type="text/javascript"
	src="<c:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>
<script type='text/javascript' src='<s:url value="/dwr/engine.js"/>'></script>
<script type='text/javascript' src='<s:url value="/dwr/interface/MccQuery.js"/>'></script>
<style>
　　　
　　　　　a {
	text-decoration: none
}

　　　　　a:hover {
	color: red;
	text-decoration: none
}

a:VISITED {
	color: red;
}
　　


　　　
</style>

<script type="text/javascript">

   $(document).ready(function(){
      $("#sub").click(function(){
         var orgCode = $("#orgCode").val();
         if(orgCode == 99){
           alert("请选择机构");
           return false;
         } 
         var upload=$("#upload").val();
         if(upload == ''){
           alert("请选择文件");
           return false;
         }
      });
   });

   function loadOCode(){
        var orgCode = $("#orgCode").val();
		if (!orgCode) {
			return;
		}
		
		MccQuery.loadOCode(orgCode, function(sortSmall) {
			fillSelect_sort("accountNo", sortSmall);
		});
   }
	
	function fillSelect_sort(sid, address) {
	  		
				if (!address || !sid) {
					return;
				}
				var $select = $("#" + sid);
				$select.empty();
				
				
				for ( var i = 0; i < address.length; i++) {
					$select.append("<option value='"+address[i].CODE+"'>"
							+ address[i].NAME + "</option>");
					
				}
		}
</script>



</head>

<body>

	<div class="subpage">
		<s:form id="queryUserForm" action="/merinfoImportNS/merinfoImport.ct" method="post"
			theme="simple" enctype="multipart/form-data">
			<div class="user_title">
				<h2 class="headline-inquires">
					商户批量导入<br />
					<span class="sub-title"></span>
				</h2>
			</div>
			
			<table width="100%" cellpadding="0" cellspacing="0" border="0"
				class="query_table">

				<tr>
					<td colspan="8" align="center">
						<h2 class="headline-inquires">
							<br />
							<span class="sub-title"></span>
						</h2>

					</td>
				</tr>


				<tr>
					<td colspan="8">&nbsp;</td>
				</tr>

				<tr>
				 <s:if test="#session.session_merchant.roleType==\"03\"||#session.session_merchant.roleType==\"15\" || #session.session_merchant.roleType==\"16\"">
				      <s:hidden name="orgCode" id="orgCode" value="%{#session.session_merchant.orgCode}"/>
				 </s:if>
				 <s:else>
					<td align="right" width="15%">所属机构：</td>
					<td>
						<s:select cssClass="queryWidth" name="orgCode" onchange="loadOCode()"
							id="orgCode"
							list="orgList" listKey="org_code" listValue="org_name" headerKey="99" headerValue="--请选择--"/>
					</td>
				 </s:else>
            
					 
						</tr>

				<tr>
						<td colspan="8" align="center">
						    <span style="font-color: red"><s:actionerror /></span>
							<span style="font-color: red;">
							<s:actionmessage /></span >
						    <span style="font-color: red;"><s:fielderror cssClass="fieldError" /></span>
							<span id="otherError" style="font-color: red"></span>
						</td>
					</tr>
				
				<tr>
					<td colspan="8">&nbsp;<s:token></s:token></td>
				</tr>
				<tr>
					<td colspan="8" align="center" style="height: 10px;">
						
					</td>
				</tr>
				<tr>
						<td colspan="8" align="center"> 请选择文件<s:file id="upload" name="upload"></s:file>
						&nbsp;<s:submit id="sub"  value="导入" />
					</td>
				</tr>
			</table>
			
		</s:form>
			
	</div>
	<s:if test="#request.msg !=null">
		<script language="javascript">
			alert("${request.msg}");
		</script>
	</s:if>
</body>
</html>
